package com.sky.service.impl;

import com.sky.domain.Dept;
import com.sky.mapper.DeptMapper;
import com.sky.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 尹稳健~
 * @version 1.0
 */
@Service
public class DeptServiceImpl implements DeptService {

    @Autowired
    private DeptMapper deptMapper;

    // 查询所有部门 模糊查询
    public List<Dept> deptList(String name){
        return deptMapper.deptList(name);
    }

    @Override
    public Dept findDeptById(Integer id) {
        return deptMapper.findDeptById(id);
    }

    @Override
    public void update(Dept dept) {
        deptMapper.update(dept);
    }

    @Override
    public void add(Dept dept) {
        deptMapper.add(dept);
    }

    @Override
    public void delete(Integer id) {
        deptMapper.delete(id);
    }
}
